Dynomotion

Group: DynoMotion Message: 7719 From: Toby Rule Date: 6/20/2013
Subject: SetBit m-codes not working

Hi Tom,

 

I just switched to KMotion431e.  I’m finding that under certain conditions, the set-bit m-codes are not working.  For instance, if I set the following in my C# code, in order to configure M106 and M107 to goggle bit 50 on and off ...

 

kmInterpreter.SetMcodeAction(21 + 106 - 100, KMotion_dotNet.MCODE_TYPE.M_Action_Setbit, 50, 1, 0, 0, 0, "");

kmInterpreter.SetMcodeAction(21 + 107 - 100, KMotion_dotNet.MCODE_TYPE.M_Action_Setbit, 50, 0, 0, 0, 0, "");

 

… and then run the following program ...

 

g0 x0 y0

m106

g1 x10 y0

m107

g0 x0 y0

m106

g1 x10 y0

m107

g0 x0 y0

m106

g1 x10 y0

m107

g0 x0 y0

m2

 

... bit 50 only toggles on, then off, and then it doesn’t toggle any more after line 5.

 

If I replace the g0 commands with g1 commands, then the bits toggle correctly.

 

 

 

 

The information contained in this transmission is intended only for the person or entity
to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive
material. If you are not the intended recipient, please contact the sender immediately
and destroy the material in its entirety, whether electronic or hard copy. You are
notified that any review, retransmission, copying, disclosure, dissemination or other
use of, or taking of any action in reliance upon this information by persons or entities 
other than the intended recipient is prohibited.
Group: DynoMotion Message: 7720 From: Toby Rule Date: 6/20/2013
Subject: Re: SetBit m-codes not working

HI Tom,

 

I found that I get the same result when I use (Buf,SetBitBuf50) and (Buf,ClearBitBuf50) instead of M106 and M107.

 

Toby

 

Group: DynoMotion Message: 7732 From: Tom Kerekes Date: 6/21/2013
Subject: Re: SetBit m-codes not working
Hi Toby,

Please see if this Patch resolves the issue:

http://dynomotion.com/Software/Patch/FixEmbbededIOwRapid431f/GCodeInterpreter.dll

http://dynomotion.com/Software/Patch/FixEmbbededIOwRapid431f/CoordMotion.cpp

Thanks for the clear example.

Regards
TK


Group: DynoMotion Message: 7762 From: Toby Rule Date: 6/24/2013
Subject: Re: SetBit m-codes not working

Hi Tom,

 

That does the trick.  Thanks for the quick response! 

 

I can see that you’ve been making lots of changes to GCodeInterpreter.dll.  While you’re at it, can you add a method to calculate the currently-executing g-code line?  I’m still patching your version with a function to do this, and based on our previous discussions, I think the code I’m using is likely to break in the event of a coordinated motion operation long enough to cause the buffer to circle around.  My code is pre-circular-buffer.

 

Toby

 

Group: DynoMotion Message: 7901 From: Toby Rule Date: 7/10/2013
Subject: Re: SetBit m-codes not working
Hi Tom, 

I found that although the patch fixed the SetBit case, if I do SetTwoBits, it still doesn't work.  If I set the MCodeAction as below, and then run the program from my previous example, the bits toggle on, then off, and then they don't do anything for the rest of the program. 

            kmInterpreter.SetMcodeAction(21 + 106 - 100, KMotion_dotNet.MCODE_TYPE.M_Action_SetTwoBits, 50, 1, 51, 1, 0, "");
            kmInterpreter.SetMcodeAction(21 + 107 - 100, KMotion_dotNet.MCODE_TYPE.M_Action_SetTwoBits, 50, 0, 51, 0, 0, "");

Thanks,

Toby

Group: DynoMotion Message: 7907 From: Tom Kerekes Date: 7/10/2013
Subject: Re: SetBit m-codes not working
Hi Toby,

I tested setting Two bits from KMotionCNC and I can't see a problem. 

Maybe there is an issue with the Patch.  Here is a complete new Test Version.  Please try it so we know we are using the exact same code.

http://dynomotion.com/Software/KMotion431g.exe

Regards
TK


From: Toby Rule <trule@...>
To: "DynoMotion@yahoogroups.com" <DynoMotion@yahoogroups.com>
Sent: Wednesday, July 10, 2013 2:38 PM
Subject: RE: [DynoMotion] RE: SetBit m-codes not working

 
Hi Tom, 

I found that although the patch fixed the SetBit case, if I do SetTwoBits, it still doesn't work.  If I set the MCodeAction as below, and then run the program from my previous example, the bits toggle on, then off, and then they don't do anything for the rest of the program. 

            kmInterpreter.SetMcodeAction(21 + 106 - 100, KMotion_dotNet.MCODE_TYPE.M_Action_SetTwoBits, 50, 1, 51, 1, 0, "");
            kmInterpreter.SetMcodeAction(21 + 107 - 100, KMotion_dotNet.MCODE_TYPE.M_Action_SetTwoBits, 50, 0, 51, 0, 0, "");

Thanks,

Toby

Group: DynoMotion Message: 7911 From: Toby Rule Date: 7/11/2013
Subject: Re: SetBit m-codes not working

My mistake! I was linking to the wrong, unpatched version of KMotion.

 

Thanks,

 

Toby